.session-list {
  width: 300px;
  height: 100%;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.session-list.hidden {
  width: 0;
  overflow: hidden;
}

.session-list.visible {
  width: 18%;
}

.session-list-header {
  padding: 16px;
  border-bottom: 1px solid #e8e8e8;
  background: rgba(200, 220, 255, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

.create-session-button {
  flex: 1;
}

/* 新建对话按钮优化 */
.create-session-button {
  background: linear-gradient(135deg, #7e57c2, #5e35b1);
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(126, 87, 194, 0.3);
  transition: all 0.2s ease;
  height: 4vh;
}
/* 悬停状态 - 保持原有效果 */
.create-session-button:hover:not(:active) {
  background: linear-gradient(135deg, #9575cd, #7e57c2) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(126, 87, 194, 0.4) !important;
  color:#74b5ff;
}

/* 焦点状态 - 恢复默认样式但保留悬停能力 */
.create-session-button:focus {
  background: linear-gradient(135deg, #7e57c2, #5e35b1) !important;
  transform: none !important;
  box-shadow: 0 2px 6px rgba(126, 87, 194, 0.3) !important;
  color: white;
  outline: none !important;
}

.close-button {
  display: flex;
  align-items: center;
  justify-content: center;
}

.session-list-content {
  flex: 1;
  overflow-y: auto;
  background: rgba(200, 220, 255, 0.5);
}

.session-list-loading {
  padding: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 加载状态优化 */
.session-list-loading .ant-spin-dot-item {
  background-color: #7e57c2;
}

/* 消息列表项优化 */
.session-item {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(209, 196, 233, 0.5) !important;
  box-shadow: 0 2px 4px rgba(126, 87, 194, 0.1);
  margin: 0 8px 8px 8px !important; /* 增加底部间距 */
  border-radius: 8px;
  height:4vh;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: #d1c4e9 !important;
  box-shadow: 0 4px 8px rgba(126, 87, 194, 0.15);
}

.session-item.active {
  background: rgba(237, 231, 246, 0.95) !important;
  border: 1px solid #7e57c2 !important;
  box-shadow: 0 0 0 2px rgba(126, 87, 194, 0.2);
}

.session-item.active:hover {
  background: #e6f7ff;
  border-color: #1890ff;
}

.session-item-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.session-title {
  flex: 1;
  font-weight: 500;
  color: #4527a0 !important; /* 更深的紫色增强可读性 */
  line-height: 1.4;
  font-size: 14px;
}

.session-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.session-item:hover .session-actions {
  opacity: 1;
}

.session-item.active .session-actions {
  opacity: 1;
}

.session-edit-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.session-edit-input .ant-input {
  flex: 1;
}

.session-edit-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* 滚动条样式 */
.session-list-content::-webkit-scrollbar {
  width: 8px;
}

.session-list-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.session-list-content::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #b39ddb, #7e57c2);
  border-radius: 4px;
}

.session-list-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #9575cd, #5e35b1);
}


/* 响应式设计 */
@media (max-width: 768px) {
  .session-list {
    width: 280px;
  }
  
  .session-list.visible {
    width: 280px;
  }
  
  .session-list-header {
    padding: 12px;
  }
  
  .session-item {
    margin: 0 4px 4px 4px;
    padding: 10px 12px !important;
  }
}

/* 动画效果 */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.session-list.visible {
  animation: slideIn 0.3s ease;
}

.session-list.hidden {
  animation: slideOut 0.3s ease;
}

/* 空状态样式 */
.session-list-content .ant-empty {
  margin: 20px 0;
}

.session-list-content .ant-empty-description {
  color: #8c8c8c;
}

/* 列表项样式优化 */
.session-list-content .ant-list-item {
  border: none;
  padding: 0;
}

.session-list-content .ant-list {
  padding: 8px 0;
}

/* 操作按钮美化 */
.session-actions .ant-btn {
  color: #7e57c2;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #d1c4e9;
  border-radius: 4px;
  width: 26px;
  height: 26px;
}

.session-actions .ant-btn:hover {
  background: white;
  color: #5e35b1;
  border-color: #b39ddb;
}

.session-edit-actions .ant-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
}